#pragma once

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ----------------------------------------------------------------- */
#include <gpio.h>
#include <spi.h>
/* Exported constants ------------------------------------------------------- */
/* Exported macro ----------------------------------------------------------- */
/* Exported types ----------------------------------------------------------- */
/* Exported functions prototypes -------------------------------------------- */
#define MPU6500_CS(X)                               \
  / HAL_GPIO_WritePin(MPU_CS_GPIO_Port, MPU_CS_Pin, \
                      (X == 0) ? GPIO_PIN_RESET : GPIO_PIN_SET)

void Bsp_SPI_WriteByte(uint8_t cmd, uint8_t val);
void Bsp_SPI_ReadByte(uint8_t cmd, uint8_t *val);
void Bsp_SPI_ReadBytes(uint8_t *val, uint8_t num);
#ifdef __cplusplus
}
#endif
